package com.own.core.object.lookup.message;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.own.core.html.form.dropDown.DropDown;
import com.own.core.html.form.textField.TextField;
import com.own.core.object.Dao;

@Entity
@Table(name = "core_message")
@NamedQuery(name = "message.loadByKey", query = "from Message m  where m.key_=:key ")

public class Message extends Dao {

	private long id;

	@TextField(required = true, list = true)
	private String key_;

	@TextField(required = true, list = true)
	private String value;

//	@DropDown(list = false, autoComplete = true)
//	private Language language;

	public Message() {
	}

	@Id
	@GeneratedValue(strategy = GenerationType.TABLE)
	public long getId() {
		return id;
	}

	@Transient
	public String getName() {

		return key_;
	}

	
	public String getKey_() {
		return this.key_;
	}

	public void setKey_(String key) {
		this.key_ = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

//	public Language getLanguage() {
//		return language;
//	}
//
//	public void setLanguage(Language language) {
//		this.language = language;
//	}

	public void setId(long id) {
		this.id = id;
	}

}